<?php

namespace App\Http\Validate\OpenShop\SiteLocation;

use App\Http\Validate\AbstractBaseValidate;
use Illuminate\Support\MessageBag;
use Illuminate\Validation\ValidationException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class SiteMissionValidate extends AbstractBaseValidate
{
    function getRules(): array
    {
        // TODO: Implement getRules() method.
        return [];
    }

    function getAttributes(): array
    {
        // TODO: Implement getAttributes() method.
        return [];
    }

    function registerValidateRules(): void
    {
        // TODO: Implement registerValidateRules() method.
    }

    function getMessages(): array
    {
        // TODO: Implement getMessages() method.
        return [];
    }


    /**
     * 驳回选址信息校验
     *
     * @param array $params
     * @return MessageBag|object
     * @throws ValidationException
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public static function rejectConfirmSiteLocationValidate(array $params)
    {
        return self::getInstance()->validate(
            ["shopId", "missionId", "rejectReason"],
            $params,
            [
                "shopId"       => "required|int|min:1",
                "missionId"    => "required|int|min:1",
                "rejectReason" => "required|string|min:1"
            ]
        );
    }
}
